<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <title>小乖乐购</title>
    <script type="text/javascript">
        function setrem(swidth) {
            var cwidth = document.body.clientWidth || document.documentElement.clientWidth;
            var html = document.getElementsByTagName('html')[0];
            html.style.fontSize = (cwidth / swidth) * 100 + "px";
        }
        window.onload = function() {
            setrem(750)
        }
        window.onresize = function() {
            setrem(750)
        }
    </script>
    <link rel="stylesheet" type="text/css" href="../layui-v2.2.5/layui/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="../css/mobile/index.css"/>
</head>

<body>
<div class="layui-row list_box">
    <c:forEach items="${recordList}" var="rl">
        <div class="layui-col-xs12 list">
            <div class="layui-row list_bg" style="background: url(../img/mobile/bg.jpg) no-repeat;">
            </div>
            <span class="shop_name">${rl.name}</span>
            <div class="layui-row price">
                <span class="saleprice">原价：¥${rl.originalMoney}</span>
                <strong class="payprice">现价：¥${rl.money}</strong>
                <div class="num_box">
                    <button class="layui-btn num_btn num_btn_sub">-</button>
                    <input type="text" class="layui-text num_text" name="" id="${rl.id}" value="1" />
                    <button class="layui-btn num_btn num_btn_add">+</button>
                </div>
            </div>
            <button class="showmsg layui-btn-fluid layui-btn " onclick="pay('${id}')">购买</button>
        </div>
    </c:forEach>

</div>
<button id="btn_open" class="layui-btn" style="background-image: url(../img/mobile/daohang.png);"></button>
<div class="box" id="box0">
    <div class="box_list" style="background-image: url(../img/mobile/dizhi.png);"></div>
</div>
<div class="box" id='box1'>
    <div class="box_list" style="background-image: url(../img/mobile/dingdan.png)"></div>
</div>
<div class="box" id='box2'>
    <div class="box_list" style="background-image: url(../img/mobile/fanli.png)"></div>
</div>




</body>
<script src="../layui-v2.2.5/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/mobile/index.js" type="text/javascript" charset="utf-8"></script>
</html>